import { diffDateTime, formatDataTime, MSecond, YmdHmsFormt } from "./DateUtil";

let lastClickTime=new Date();

export function isFastClick(){
    let now=new Date();
    let cha=diffDateTime(lastClickTime,now,MSecond);
    console.log(`lastClickTime:${formatDataTime(now,YmdHmsFormt)}   ${formatDataTime(lastClickTime,YmdHmsFormt)}  ${cha}`);
    lastClickTime = now;
    if(cha>=1000) {
        return false;
    } else {
        return true;
    }
}